package com.guigu.controller;

import com.guigu.util.MinioUtil;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @description: 文件控制器
 * @author: JZC
 * @create: 2024-06-09 14:56
 **/
@RestController
@RequestMapping("/oss")
public class FileController {

    @Resource
    private MinioUtil minioUtil;

    @RequestMapping("/testGetAllBuckets")
    public String testGetAllBuckets() throws Exception {
        List<String> allBucket = minioUtil.getAllBucket();
        return allBucket.get(0);
    }

}

